package collection.Stream;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

public class Test {
    public static void main(String[] args) {
        List<Integer> list=new ArrayList<>();
        Random ra=new Random();

        for (int i = 0; i <5 ; i++) {
            list.add(ra.nextInt(100)+1);
        }
        System.out.println(list);
        boolean noneMatch=list.stream().noneMatch(e->e<60);
        if (noneMatch){
            System.out.println("成绩都会格了");
        }else {
            System.out.println("成绩不合格");
        }
        int sum=list.stream().reduce((e1,e2)->e1+e2).get();
        System.out.println("总分:"+sum);
    }
}
